/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.rbh.risk.service.impl;

import com.rbh.risk.dao.SeverityLevelDetailDao;
import com.rbh.risk.entity.Category;
import com.rbh.risk.entity.SeverityLevelDetail;
import com.rbh.risk.service.SeverityLevelDetailService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service("severityLevelDetailService")
public class SeverityLevelDetailServiceImpl implements SeverityLevelDetailService {

    @Autowired
    private SeverityLevelDetailDao severityLevelDetailDao;

    @Transactional(readOnly = false)
    @Override
    public void insert(SeverityLevelDetail severityLevelDetail) {
        this.severityLevelDetailDao.insert(severityLevelDetail);
    }

    @Transactional(readOnly = false)
    @Override
    public void update(SeverityLevelDetail severityLevelDetail) {
        this.severityLevelDetailDao.update(severityLevelDetail);
    }

    @Transactional(readOnly = false)
    @Override
    public void delete(SeverityLevelDetail severityLevelDetail) {
        this.severityLevelDetailDao.delete(severityLevelDetail);
    }

    @Transactional(readOnly = true)
    @Override
    public SeverityLevelDetail getById(Integer sldescId) {
        return this.severityLevelDetailDao.getById(sldescId);
    }

    @Transactional(readOnly = true)
    @Override
    public List<SeverityLevelDetail> getAll() {
        return this.severityLevelDetailDao.getAll();
    }

    @Transactional(readOnly = true)
    @Override
    public List<SeverityLevelDetail> getByCategory(Category category) {
        return this.severityLevelDetailDao.getByCategory(category);
    }
}
